package com.zzy.controller;

import com.zzy.model.AjaxMsg;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

@Controller
@RequestMapping()
public class IndexController {

    /**返回一个json对象*/
    @RequestMapping({"/test"})
    @ResponseBody
    public AjaxMsg test(String id, HttpServletRequest request, HttpServletResponse response) {
        System.out.println(id);
        return AjaxMsg.returnAjaxMsg(200,"welcome to test ！");
    }



}
